package com.miplus.ccrm.core.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 坐席外呼通话ASR转录明细表
 * @TableName ASR_CALLHIST
 */
@TableName(value ="ASR_CALLHIST")
@Data
public class AsrCallhist implements Serializable {
    /**
     * UID
     */
    @TableId
    private String asrid;

    /**
     * 创建时间
     */
    private Date crdt;

    /**
     * 分机号
     */
    private String dn;

    /**
     * 坐席ID
     */
    private String agentid;

    /**
     * 关联呼叫ID
     */
    private String callid;

    /**
     * 会话方：peerspeech=对方，speech=自己
     */
    private String asrstatus;

    /**
     * ASR返回的文本
     */
    private String asrcontent;

    /**
     * 匹配度
     */
    private String confidence;

    /**
     * 关键词
     */
    private String words;

    /**
     * ASR关联ID
     */
    private String taskid;

    /**
     * 0=实时，1=离线
     */
    private String status;

    /**
     * ASR解析顺序index
     */
    private Integer asrindex;

    /**
     * 状态文本
     */
    private String statustext;

    /**
     * 被叫
     */
    private String dnis;

    /**
     * 主叫
     */
    private String ani;

    /**
     * IN/OUT
     */
    private String calldir;

    /**
     * 时长（秒）
     */
    private BigDecimal span;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AsrCallhist other = (AsrCallhist) that;
        return (this.getAsrid() == null ? other.getAsrid() == null : this.getAsrid().equals(other.getAsrid()))
            && (this.getCrdt() == null ? other.getCrdt() == null : this.getCrdt().equals(other.getCrdt()))
            && (this.getDn() == null ? other.getDn() == null : this.getDn().equals(other.getDn()))
            && (this.getAgentid() == null ? other.getAgentid() == null : this.getAgentid().equals(other.getAgentid()))
            && (this.getCallid() == null ? other.getCallid() == null : this.getCallid().equals(other.getCallid()))
            && (this.getAsrstatus() == null ? other.getAsrstatus() == null : this.getAsrstatus().equals(other.getAsrstatus()))
            && (this.getAsrcontent() == null ? other.getAsrcontent() == null : this.getAsrcontent().equals(other.getAsrcontent()))
            && (this.getConfidence() == null ? other.getConfidence() == null : this.getConfidence().equals(other.getConfidence()))
            && (this.getWords() == null ? other.getWords() == null : this.getWords().equals(other.getWords()))
            && (this.getTaskid() == null ? other.getTaskid() == null : this.getTaskid().equals(other.getTaskid()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getAsrindex() == null ? other.getAsrindex() == null : this.getAsrindex().equals(other.getAsrindex()))
            && (this.getStatustext() == null ? other.getStatustext() == null : this.getStatustext().equals(other.getStatustext()))
            && (this.getDnis() == null ? other.getDnis() == null : this.getDnis().equals(other.getDnis()))
            && (this.getAni() == null ? other.getAni() == null : this.getAni().equals(other.getAni()))
            && (this.getCalldir() == null ? other.getCalldir() == null : this.getCalldir().equals(other.getCalldir()))
            && (this.getSpan() == null ? other.getSpan() == null : this.getSpan().equals(other.getSpan()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAsrid() == null) ? 0 : getAsrid().hashCode());
        result = prime * result + ((getCrdt() == null) ? 0 : getCrdt().hashCode());
        result = prime * result + ((getDn() == null) ? 0 : getDn().hashCode());
        result = prime * result + ((getAgentid() == null) ? 0 : getAgentid().hashCode());
        result = prime * result + ((getCallid() == null) ? 0 : getCallid().hashCode());
        result = prime * result + ((getAsrstatus() == null) ? 0 : getAsrstatus().hashCode());
        result = prime * result + ((getAsrcontent() == null) ? 0 : getAsrcontent().hashCode());
        result = prime * result + ((getConfidence() == null) ? 0 : getConfidence().hashCode());
        result = prime * result + ((getWords() == null) ? 0 : getWords().hashCode());
        result = prime * result + ((getTaskid() == null) ? 0 : getTaskid().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getAsrindex() == null) ? 0 : getAsrindex().hashCode());
        result = prime * result + ((getStatustext() == null) ? 0 : getStatustext().hashCode());
        result = prime * result + ((getDnis() == null) ? 0 : getDnis().hashCode());
        result = prime * result + ((getAni() == null) ? 0 : getAni().hashCode());
        result = prime * result + ((getCalldir() == null) ? 0 : getCalldir().hashCode());
        result = prime * result + ((getSpan() == null) ? 0 : getSpan().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", asrid=").append(asrid);
        sb.append(", crdt=").append(crdt);
        sb.append(", dn=").append(dn);
        sb.append(", agentid=").append(agentid);
        sb.append(", callid=").append(callid);
        sb.append(", asrstatus=").append(asrstatus);
        sb.append(", asrcontent=").append(asrcontent);
        sb.append(", confidence=").append(confidence);
        sb.append(", words=").append(words);
        sb.append(", taskid=").append(taskid);
        sb.append(", status=").append(status);
        sb.append(", asrindex=").append(asrindex);
        sb.append(", statustext=").append(statustext);
        sb.append(", dnis=").append(dnis);
        sb.append(", ani=").append(ani);
        sb.append(", calldir=").append(calldir);
        sb.append(", span=").append(span);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}